package com.onstar.cn.api.v2;

import android.content.Context;

import com.onstar.cn.api.framework.ClazzInjectUtils;
import com.onstar.cn.api.framework.annotation.Path;
import com.onstar.cn.api.framework.annotation.PathParams;
import com.onstar.cn.api.framework.annotation.RequestMapping;
import com.onstar.cn.framework.network.entity.RequestEntity;

/**
 * @Title: GprsPackageService.java
 * @author Xiaofeng Feng
 * @date 2015年8月11日 下午2:15:18
 */
@Path("/msp/api/v3/user")
public class GprsPackageService {

	private String serverURL;
	private Context mContext;
	/**
	 *
	* @Description: GprsPackageService构造函数
	* @author Xiaofeng Feng
	* @date 2015年9月11日 下午2:01:21
	 */

	public GprsPackageService(String serverURL) {
		this.serverURL = serverURL;
	}

	public GprsPackageService(String serverURL, Context context) {
		this.serverURL = serverURL;
		mContext = context;
	}

	/**
	 * @Title: getGprsPackageService @Description: 安吉星套餐
	 * /subscriber/{subscriberID}/accounts/{accountID}/vehicles/{vin}/packages/my_packages
	 * request method:PUT @param 设定文件 @return void
	 * 返回类型 @throws
	 */
	///msp/api/v3/user/subscriber/ONSTARM21631143/accounts/1201762298/vehicles/LSGAR5AL2G4240018/packages/my_packages
	@RequestMapping("/subscriber/{subscriberID}/accounts/{accountID}/vehicles/{vin}/packages/my_packages")
	public RequestEntity getGprsPackageService(RequestEntity entity, @PathParams("subscriberID") String subscriberID,
			@PathParams("accountID") String accountID, @PathParams("vin") String vin) {
		if (entity == null) {
			entity = new RequestEntity();
		}

		String url = ClazzInjectUtils.injectUrl(getClass(), "getGprsPackageService", entity,subscriberID, accountID,vin);
		entity.setUrl(serverURL+url);
		return entity;
	}
}

